package com.fjut.pms.action;

import com.fjut.pms.pojo.Checking;
import com.fjut.pms.service.ICheckingService;
import com.fjut.pms.utils.PageBean;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;

public class CheckingAction extends ActionSupport implements
		ModelDriven<PageBean> {

	private static final long serialVersionUID = 3454329574677319955L;
	private ICheckingService checkService;
	private PageBean page = new PageBean();
	private Checking check = new Checking();
	private int id;

	public String show() {
		page = checkService.findCheck(page, id);
		return "show";
	}

	public String count() {
		return "count";
	}

	public String add() {
		checkService.save(check);
		return "add";
	}

	public ICheckingService getCheckService() {
		return checkService;
	}

	public void setCheckService(ICheckingService checkService) {
		this.checkService = checkService;
	}

	public PageBean getPage() {
		return page;
	}

	public void setPage(PageBean page) {
		this.page = page;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public PageBean getModel() {
		return this.getPage();
	}

	public Checking getCheck() {
		return check;
	}

	public void setCheck(Checking check) {
		this.check = check;
	}

}
